package com.four.basicinfo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.four.basicinfo.entity.Abroad;
import com.four.basicinfo.entity.CriminalResponsibility;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CriminalResponsibilityDao extends BaseMapper<CriminalResponsibility> {
    /**
     * 查询刑事责任
     *
     * @param id 刑事责任主键
     * @return 刑事责任
     */
    public CriminalResponsibility selectCriminalResponsibilityById(Long id);
    //查询个人
    @Select("select id, number, name, relationship, identity, investigate_date as investigateDate, " +
            "investigate_reason as investigateReason, processing_stage as processingStage, processing_results as processingResults, notes from criminal_responsibility where number=#{number}")
    public List<CriminalResponsibility> selectByNum(Integer number);

    /**
     * 新增刑事责任
     *
     * @param criminalResponsibility 刑事责任
     * @return 结果
     */
    public int insertCriminalResponsibility(CriminalResponsibility criminalResponsibility);

    /**
     * 修改刑事责任
     *
     * @param criminalResponsibility 刑事责任
     * @return 结果
     */
    public int updateCriminalResponsibility(CriminalResponsibility criminalResponsibility);

    /**
     * 删除刑事责任
     *
     * @param id 刑事责任主键
     * @return 结果
     */
    public int deleteCriminalResponsibilityById(Long id);
}
